You are here: Symbol Reference > Dew Namespace > Dew.Stats Namespace > Dew.Stats.Units Namespace > Classes > Statistics Class > Statistics Methods > GeometricFit Method > Statistics.GeometricFit Method ([In] TVec, out double, double[], double)
Dew Stats for .NET
ContentsIndexHome
PreviousUpNext
Statistics.GeometricFit Method ([In] TVec, out double, double[], double)

Calculate parameters for geometrically distributed values.

Syntax
C#
Visual Basic
public static void GeometricFit([In] TVec X, out double P, ref double[] PCI, double Alpha);
Parameters 
Description 
[In] TVec X 
Stores data which is assumed to be geometricaly distributed. 
out double P 
Returns geometric distribution parameter estimator. 
ref double[] PCI 
P (1-Alpha)*100 percent confidence interval. 
double Alpha 
Confidence interval percentage. 

RandomGeometric, GeometricStat

The following example generates 1000 random Geometric distributed values and then uses GeometricFit routine to extract used P parameter

using Dew.Math; using Dew.Stats; using Dew.Stats.Units; namespace Dew.Examples; { private void Example() { Vector vec1 = new Vector(1000, false); // first, generate 1000 randomly geometr. distributed // numbers with parameter p=0.713 StatRandom.RandomGeometric(0.713, vec1, -1); // Now, extract the p and its 100*(1-0.05) = 95% // confidence interval double resp; double[] CIp = new double[2]; Statistics.GeometricFit(vec1, out resp, out CIp, 0.05); } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!